//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<xeres_dx10.cpp>
///	@path	~/src/graphics/dx10/
///	@date	2007/10/18
///	@desc	Use of DirectX 10 decl.

#include "config/config.h"

#include "graphics/dx10/import_dx10.h"
#include "graphics/dx10/CDevice10.h"
#include "graphics/dx10/CRenderer10.h"
#include "graphics/dx10/CSimpleGeometry10.h"

// force linker to link these libs
#pragma comment( linker , "/defaultlib:dxerr.lib" )
#pragma comment( linker , "/defaultlib:dxguid.lib" )

namespace xeres {

	bool LoadDirectX10( bool enable_debug )
	{
		dx10::InitializeDirect3D10( enable_debug );
		dx10::InitializeDirect3DX10( enable_debug , 40 );
		if( FAILED( dx10::D3DX10CheckVersion( D3D10_SDK_VERSION, D3DX10_SDK_VERSION ) ) )
			return false;

		TRACE_INFO( _S("Registering DirectX 10 graphics classes...") );

		IOBJECT_REGISTER_CLASS( CDevice10 );
		IOBJECT_REGISTER_CLASS( CRenderer10 );
		IOBJECT_REGISTER_CLASS( CSimpleGeometry10 );

		return true;
	}

} // namespace xeres
